Proof of concept part of cpython extension using Cython#172
Proof of concept part of cpython extension using Cython#172
Conversation
|
I am not familiar with I have recently read about pybind11. Maybe that would be another alternative to consider. |
|
@dirk-thomas Yes, it limits us to the cpython interpreter. Cython generates C code that uses the CPython extension API. It also supports pypy because pypy implements a subset of that. The current state and pybind11 have the same interpreter limitation for the same reason. I can look into pybind11 and make a list of pros and cons |
Thanks for the clarification.
That would be great. |
|
In general, I'm in favor of using something that generates code and reduces the burden of python binding maintenance for us. Off the top of my head, it is probably worth surveying Cython, pybind11, boost::python, and SWIG for this purpose, and seeing which fits in with our goals the best. |
|
@dirk-thomas comparison to pybind11 in #173 @clalancette I think boost::python can be skipped since pybind11 is a header only fork-ish of it. I think it is safe to assume pybind11 has all of the advantages without the overhead of installing boost. |
|
Thanks @sloretz for putting this together. Agreed regarding the statement about |
|
I will close this for now since it seems pybind11 is most likely, but I will wait to delete the branch until that is confirmed. |
…anigans Fix a lot of header shenanigans
This PR is meant to generate discussion on using Cython for creating parts of the cpython extension in rclpy. Cython is a superset of python that can generate C code for cpython extensions. This PR does nothing beyond successfully build (as long as
sudo apt install cython3happens first). If the outcome of discussion is consensus in favor, I think the next step would be to replace #140 with a PR using Cython.Advantages
Disadvantages